package com.huawang.mdesign.model.service.model.core.display.executor.show.factory;

import com.huawang.business.dto.graph.ModelInfo;
import com.huawang.business.service.model.core.InternalUmlService;
import com.huawang.business.service.model.core.display.executor.show.MethodLibrary;
import com.huawang.business.service.model.core.display.executor.show.ShowPropertyStatus;
import com.huawang.business.service.model.core.display.executor.show.factory.IQuerySpecialModelIcon;
import com.huawang.business.service.model.core.display.executor.show.factory.QuerySpecialModelIconFactory;
import com.huawang.business.service.model.core.display.icon.QuerySpecialModelIcon;
import com.huawang.core.definition.mof.instances.MetaClassInstance;
import com.huawang.mdesign.model.service.model.core.display.icon.UAFQuerySpecialModelIcon;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class QuerySpecialModelIconInstance implements IQuerySpecialModelIcon {

    @Override
    @NotNull
    public QuerySpecialModelIcon newInstance(@NotNull MetaClassInstance owningInstance, @NotNull ShowPropertyStatus proceedingComputedStatus, @NotNull MethodLibrary methodFunction, @NotNull InternalUmlService internalUmlService, @NotNull String projectId, ModelInfo modelInfo) {
        return new UAFQuerySpecialModelIcon(owningInstance, proceedingComputedStatus, methodFunction, internalUmlService, projectId, modelInfo);
    }

    @PostConstruct
    @Override
    public void init() {
        QuerySpecialModelIconFactory.setWrapper(this);
    }
}
